@echo off
set WINSCP_PATH=C:\Program Files (x86)\WinSCP\WinSCP.com
set PI_ADDRESS=pi@172.16.14.99
set PI_PASSWORD=Mindteco
set PI_REMOTE_PATH=/var/www/dist
set LOCAL_DIST_PATH=%CD%\dist

"%WINSCP_PATH%" /command ^
    "open %PI_ADDRESS% -password=%PI_PASSWORD%" ^
    "call sudo rm -rf %PI_REMOTE_PATH%/*" ^
    "synchronize remote -delete %LOCAL_DIST_PATH% %PI_REMOTE_PATH%" ^
    "call sudo rm -rf /home/pi/Project/web/cef/Cache" ^
    "exit"
